package Multithreading.Exercise005;

/**
 * ClassName:ThreadDome001
 * Package:Multithreading.Exercise005
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/3/6-22:00
 * @Version:v1.0
 */
public class ThreadDome001 {
    /*有100份礼品,两人同时发送,当剩下的礼品小于10份的时候则不再送出
     * 利用多线程模拟该过程并将线程的名字和礼物的剩余数量打印出来*/
    public static void main(String[] args) {
        MyRunnable mr = new MyRunnable();
        Thread t1 = new Thread(mr,"大大");
        Thread t2 = new Thread(mr,"小小");

        t1.start();
        t2.start();

    }
}
